using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using BUSLayer;
using Cores;
using DAOLayer;

public partial class XemThongTinDienVien : System.Web.UI.Page
{
    
    protected void Page_Load(object sender, EventArgs e)
    {
        if (IsPostBack == false)
        {
            TenTextBox.Focus();
        }
    }
    DienVienBus DVbus = new DienVienBus();
    PhimBus PBus = new PhimBus();
   
    public void LoadThongTinDienVien()
    {
        string TenDV = TenTextBox.Text;
        DataTable tblDV = DVbus.DSDienVienTheoTen(TenDV);
        DienVienGridView.DataSource = tblDV;
        DienVienGridView.DataBind();
        
    }
    public void LoadThongTinPhimCuaDienVien()
    {
        string TenDV = TenTextBox.Text;
        DataTable tblP = PBus.DSPhimTheoDV(TenDV);
        PhimGridView.DataSource = tblP;
        PhimGridView.DataBind();
    }
    protected void Button1_Click(object sender, EventArgs e)
    {
        LoadThongTinDienVien();
        LoadThongTinPhimCuaDienVien();
    }
}
